#pragma once

#include "../IFilter.h"
#include "../../ImageCores/xImage.h"
#include "../../ImageCores/ImageEx.h"

enum MReconstructionType
{
	OBR, CBR
};

// CGrayscaleReconstructor command target

class CGrayscaleReconstructor : public IImageFilter
{
public:
	CGrayscaleReconstructor();
	CGrayscaleReconstructor(MReconstructionType type) : m_type(type) {}
	virtual ~CGrayscaleReconstructor();

	inline void SetType(MReconstructionType type) { m_type = type; }
	inline MReconstructionType GetType() { return m_type; }
	inline void SetSESize(int size) { m_seSize = size; }

	virtual BOOL Apply(CxImage& srcImage, CxImage& destImage);
	virtual BOOL Apply(CxImage& srcImage, CxImage& midImage, CxImage& destImage);
protected:
	virtual BOOL Reconstruct(CxImage& srcImage, CxImage& maskImage);

	MReconstructionType m_type;
	int m_seSize;
};
